package com.example.code.feign;

import com.example.common.ResultMessage;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author kangshuai
 */
@FeignClient("service-email")
public interface EmailFeign {

    /**
     * 发送邮件验证码
     *
     * @param email
     * @param code
     * @return
     */
    @GetMapping(value = "email/send", produces = {"application/json;charset=UTF-8"})
    ResultMessage<Boolean> sendEmail(@RequestParam("email") String email, @RequestParam("code") String code);
}
